//
//  RBResponse.h
//  Culture
//
//  Created by Lan on 2017/9/8.
//  Copyright © 2017年 SummerTea. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

@interface RBResponse : NSObject

//返回值
@property(nonatomic, copy) NSString *message;
@property(nonatomic, assign) NSInteger code;

//计算值 succeed=code==200
@property(nonatomic, assign) BOOL succeed;

//手动拼接值
@property(nonatomic, strong) NSDictionary *headers;
@property(nonatomic, strong) NSError *error;
@property(nonatomic, strong) id responseObject;

//分页

/** 页内数据 */
@property(nonatomic, strong) NSArray *items;
/** 当前页码 */
@property(nonatomic, assign) NSInteger currentPage;
/** 总页码 */
@property(nonatomic, assign) NSInteger totalPage;
@property(nonatomic, assign) NSInteger per_page;
/**
 *  下一页的页码
 *  当前页+1
 */
@property(nonatomic, assign) NSInteger nextPage;
/**
 *  是否还有下一页数据
 *  可能是根据当前页和总页数对比所得
 *  也可能是根据返回接口是否有数据所得
 */
@property(nonatomic, assign) BOOL hasNextPage;

//方便调用,实在记不住yy的名字,用这个舍弃上面的映射
+ (NSDictionary *)rbRenameKeyDic;
+ (NSDictionary *)rbAssignClassDic;

@end
